﻿@model LuceneSettingsViewModel


@if (Model.SearchIndexes.Any())
{
<fieldset class="form-group" asp-validation-class-for="SearchIndex">
    <label asp-for="SearchIndex">@T["Default search index"] <span asp-validation-for="SearchIndex"></span></label>
    <select asp-for="SearchIndex" class="form-control">
        @foreach (var index in Model.SearchIndexes)
        {
            <option value="@index" selected="@(Model.SearchIndex == index)">@index</option>
        }
    </select>
    <span class="hint">@T["The default index to use for the search page."]</span>
</fieldset>
}
else
{
    <div class="alert alert-warning">@T["You need to create at least an index to set as the Search index."]</div>
}

<fieldset class="form-group" asp-validation-class-for="SearchFields">
    <label asp-for="SearchFields">@T["Default searched fields"] <span asp-validation-for="SearchFields"></span></label>
    <input asp-for="SearchFields" class="form-control" />
    <span class="hint">@T["A comma separated list of fields to use for search pages. (e.g., Content.ContentItemMetadata.DisplayText, Content.BodyAspect.Body)"]</span>
</fieldset>

